package cn.clq.ymcc.consumer;

import cn.clq.ymcc.service.IMessageSmsService;
import org.apache.rocketmq.common.message.MessageExt;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.nio.charset.StandardCharsets;

@Component
@RocketMQMessageListener(
        consumerGroup="email-consumer-group",
        topic="email-topic",
        selectorExpression="email-tags"
)
public class CourseOnSendEmailConsumer implements RocketMQListener<MessageExt> {
    @Autowired
    private IMessageSmsService messageSmsService;

    @Override
    public void onMessage(MessageExt messageExt) {
        String jsonString = new String(messageExt.getBody(), StandardCharsets.UTF_8);

    }
}
